Skip to content

SIMA patch for fixing energy bug in physics-dynamics coupling#393

Merged
jimmielin merged 2 commits into
ESCOMP:mainfrom
jimmielin:hplin/pdc-energy-bug-fix-sima
May 18, 2026
Merged

SIMA patch for fixing energy bug in physics-dynamics coupling#393
jimmielin merged 2 commits into
ESCOMP:mainfrom
jimmielin:hplin/pdc-energy-bug-fix-sima

Conversation

@jimmielin
Copy link
Copy Markdown
Member

@jimmielin jimmielin commented May 13, 2026

Tag name (The PR title should also include the tag name):
Originator(s): @jimmielin (adapted from original fixes by @PeterHjortLauritzen)

Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number):

List all namelist files that were added or changed:

List all files eliminated and why:

List all files added and what they do:

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status main...<your_branch_name>)

M       schemes/conservation_adjust/check_energy/check_energy_chng.meta
M       schemes/conservation_adjust/check_energy/check_energy_scaling.meta
M       schemes/conservation_adjust/check_energy/dycore_energy_consistency_adjust.meta
M       schemes/sima_diagnostics/check_energy_diagnostics.F90
M       schemes/sima_diagnostics/check_energy_diagnostics.meta
  - update cp_or_cv_dycore and scaling_dycore standard names to add _at_start_of_physics_timestep as correctly intended

M       suites/suite_cam7.xml
M       suites/suite_kessler.xml
M       suites/suite_tj2016.xml
  - comment out thermo_water_update as it is used for not-yet-present tot_energy_phys diag.
  - add comments explaining the true purpose of mid-physics thermo_water_update.

M       suites/suite_cam4.xml
  - add missing commented thermo_water_update call to be consistent with other SDFs

List all automated tests that failed, as well as an explanation for why they weren't fixed:

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?

If yes to the above question, describe how this code was validated with the new/modified features:

@jimmielin jimmielin self-assigned this May 13, 2026
@jimmielin jimmielin added the bug-fix This PR was created to fix a specific bug. label May 13, 2026
@jimmielin jimmielin requested a review from nusbaume May 13, 2026 11:30
Copy link
Copy Markdown
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jimmielin!

@nusbaume nusbaume requested a review from peverwhee May 13, 2026 16:07
@jimmielin jimmielin merged commit 26f4f55 into ESCOMP:main May 18, 2026
4 checks passed
jimmielin added a commit to ESCOMP/CAM-SIMA that referenced this pull request May 18, 2026
…498)

Tag name (required for release branches): sima0_14_000
Originator(s): @jimmielin (adapted from original fixes by
@PeterHjortLauritzen)
AI tools used (if applicable; please also add the "AI-generated code"
label to the PR):
  What:
  How:

Description (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):
- Companion issue of
ESCOMP/atmospheric_physics#393
- CAM-SIMA equivalent fix of ESCOMP/CAM#1554

Describe any changes made to build system:

Describe any changes made to the namelist:

List any changes to the defaults for the input datasets (e.g. boundary
datasets):

List all files eliminated and why:

List all files added and what they do:

List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)
```
M       src/data/registry.xml
M       tools/stdnames_to_inputnames_dictionary.xml
  - update long name of cp_or_cv_dycore to clarify its runtime usage
  - add cp_or_cv_dycore_at_start_of_physics_timestep which is used by the dycore energy consistency adjust scheme and energy checker

M       src/dynamics/mpas/dyn_coupling_impl.F90
M       src/dynamics/se/dp_coupling.F90
  - save cp_or_cv_dycore_at_start_of_physics_timestep during d-p coupling
```

If there are new failures (compared to the
`test/existing-test-failures.txt` file),
have them OK'd by the gatekeeper, note them here, and add them to the
file.
If there are baseline differences, include the test and the reason for
the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima:
```
  SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details:
    FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam (Overall: DIFF) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_intel.cam-outfrq_se_cslam (Overall: DIFF) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_intel.cam-outfrq_se_cslam BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
  - new baselines due to thermo_water_update bug fix.

  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: DIFF) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape NLCOMP
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_intel: DIFF
  - pre-existing failure.
  - new baselines due to thermo_water_update bug fix.
```

derecho/gnu/aux_sima:
```
  SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: DIFF) details:
    FAIL SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_gnu.cam-outfrq_se_cslam BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FTJ16.derecho_gnu.cam-outfrq_se_cslam BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: DIFF
  - new baselines due to thermo_water_update bug fix.

  SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: FAIL) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam RUN time=13
  - pre-existing failure.
```

derecho/nvhpc/aux_sima (test is run via Github workflow. Only run the
test manually if we need to save new baselines): All PASS

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than
latest:

---------

Co-authored-by: Kuan-Chih Wang <towerman@livemail.tw>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix This PR was created to fix a specific bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants